<?php
include("../include/config.inc.php");
include("userlogincheck.php");

$id=$_REQUEST["id"];

$sql="update ".tableprefix."goods set goods_state='0' where goods_id='$id'";
$db->query($sql);
if(!$db->error()){
	echo "<script>alert('删除成功！');location.href='mygoods.php';</script>";
	exit;
}
else{
	echo "<script>alert('数据库出错！');location.href='index.php';</script>";
	exit;
}		
$db->close();
exit;
?>